<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <div>{{reverseMessage}}</div>
    <div>{{copyMsg}}</div>
    <!--<div>{{reverseMessage()}}</div>-->
</div>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            message: 'hello javaboy!',
            copyMsg: null
        },
        methods: {
           /* reverseMessage() {
                return this.message.split('').reverse().join('');
            }*/
        },
        computed:{
            reverseMessage:{
                get() {
                    return this.message.split('').reverse().join('');
                },
                set(newVal) {
                    // console.log("set:"+newVal);
                    this.copyMsg = newVal;
                }
            }
/*            reverseMessage() {
                return this.message. split('').reverse().join('');
            }*/
        }
    })
</script>
</body>
</html>